package com.nannytools.commonObjects;

import java.util.HashMap;
import java.util.Map;

public class Address {
	private String streetAddress;
	/**
	 * @return the zipCode
	 */
	public synchronized String getZipCode() {
		return zipCode;
	}

	/**
	 * @param zipCode the zipCode to set
	 */
	public synchronized void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}
	private String townName;
	private String zipCode;
	private static final Map<String,String> stateArray = new HashMap<String, String>(50);
	
	public Address() {
		//Initialize the states of the US
		stateArray.put("AL", "Alabama");
		stateArray.put("AK", "Alaska");
		stateArray.put("AZ", "Arizona");
		stateArray.put("AR", "Arkansas");
		stateArray.put("CA", "California");
		stateArray.put("CO", "Colorado");
		stateArray.put("CT", "Connecticut");
		stateArray.put("DE", "Delaware");
		stateArray.put("FL", "Florida");
		stateArray.put("GA", "Georgia");
		stateArray.put("HI", "Hawaii");
		stateArray.put("ID", "Idaho");
		stateArray.put("IL", "Illinois");
		stateArray.put("IN", "Indiana");
		stateArray.put("IA", "Iowa");
		stateArray.put("KS", "Kansas");
		stateArray.put("KY", "Kentuky");
		stateArray.put("LA", "Lousiana");
		stateArray.put("ME", "Maine");
		stateArray.put("MD", "Maryland");
		stateArray.put("MA", "Massachsetts");
		stateArray.put("MI", "Michigan");
		stateArray.put("MN", "Minnesota");
		stateArray.put("MS", "Mississippi");
		stateArray.put("MO", "Missouri");
		stateArray.put("MT", "Montana");
		stateArray.put("NE", "Nebraska");
		stateArray.put("NV", "Nevada");
		stateArray.put("NH", "New Hampshire");
		stateArray.put("NJ", "New Jersey");
		stateArray.put("NM", "New Mexico");
		stateArray.put("NY", "New York");
		stateArray.put("NC", "North Corolina");
		stateArray.put("ND", "North Dakota");
		stateArray.put("OH", "Ohio");
		stateArray.put("OK", "Oklahoma");
		stateArray.put("PA", "Pennsylvania");
		stateArray.put("RI", "Rhode Island");
		stateArray.put("SC", "South Carolina");
		stateArray.put("SD", "South Dakota");
		stateArray.put("TN", "Tennessee");
		stateArray.put("TX", "Texas");
		stateArray.put("UT", "Utah");
		stateArray.put("VT", "Vermont");
		stateArray.put("VA", "Virginia");
		stateArray.put("WA", "Washington");
		stateArray.put("WV", "West Virginia");
		stateArray.put("WI", "Wisconsin");
		stateArray.put("WY", "Wyoming");
	}
	
	/**
	 * @return the streetAddress
	 */
	public synchronized String getStreetAddress() {
		return streetAddress;
	}
	
	public synchronized String toString() {
		String addressToReturn;
		addressToReturn = "";
		
		addressToReturn = this.streetAddress + this.townName + this.zipCode;
		return addressToReturn;
	}
	/**
	 * @param streetAddress the streetAddress to set
	 */
	public synchronized void setStreetAddress(String streetAddress) {
		this.streetAddress = streetAddress;
	}
	/**
	 * @return the townName
	 */
	public synchronized String getTownName() {
		return townName;
	}
	/**
	 * @param townName the townName to set
	 */
	public synchronized void setTownName(String townName) {
		this.townName = townName;
	}
	/**
	 * @return the statearray
	 */
	public static synchronized Map<String, String> getStatearray() {
		return stateArray;
	}
}
